<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <link href="prettify.css" type="text/css" rel="stylesheet" />
    <link href="styles.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="prettify.js"></script>
    <title>Mono support</title>
  </head>
  <body onload="prettyPrint()">
    <h1>Mono support</h1>
    <p><a href="http://mono-project.com">Mono</a> is an open source implementation of
the Common Language Infrastructure which runs on various platforms,
including Windows, Linux and OS X.</p>

<p>Noda Time runs on Mono, but with some limitations:</p>

<ul>
<li>Noda Time is not <em>developed</em> on Mono, so releases will be tested
against it (running all the unit tests), code which isn't part
of a release may not work. Please raise an issue on the
<a href="http://code.google.com/p/noda-time/issues/list">tracker page</a> if
you come across a breakage like this, and we'll fix it as soon
as possible.</li>
<li><code>TimeZoneInfo</code> in Mono has some critical flaws in the latest stable
Mono release at the time of this writing (2.10.8) - while
<a href="../api/html/T_NodaTime_TimeZones_BclTimeZone.htm"><code>BclTimeZone</code></a> <em>may</em>
do the right thing, it may disagree with the results of calling
methods directly on the time zone.</li>
<li>Some cultures in Mono have standard date/time patterns including
"z" for "offset from UTC". These will not display appropriately
when used for text formatting in Noda Time, as the "z" is
meaningless for local dates and times.</li>
<li>Some cultures in Mono have standard date/time patterns which
use the abbreviated am/pm designator, but have am/pm designators
which are the same when abbreviated. In these cases, parsing
is ambiguous.</li>
<li>If you build Noda Time under Mono but execute it under the
Microsoft .NET 4 64-bit CLR, you may see exceptions around
type initializers and <code>RuntimeHelpers.InitializeArray</code>. We believe
this to be due to a <a href="http://connect.microsoft.com/VisualStudio/feedback/details/635365">bug in .NET</a>
which the Mono compiler happens to trigger. We would recommend that
you use a binary build by the Microsoft C# compiler if you wish
to run using this CLR.</li>
</ul>

<h2>System requirements</h2>

<p>We have tested Mono support using Mono 2.10.5 and 2.10.8. To build
Noda Time under Linux, you need to install the following packages:</p>

<ul>
<li>mono-devel</li>
<li>mono-xbuild</li>
</ul>

<p>(These will add the other dependencies you need.)</p>

<p>To fetch the source code from the main Google Code repository,
you'll need a Mercurial client.</p>

<p>To run the tests, you'll need
<a href="http://nunit.org/index.php?p=download">NUnit</a> version 2.5.10 or
higher. (The version that comes with stable builds of Mono at the
time of this writing doesn't support everything used by the unit
tests of Noda Time.)</p>

<h2>Fetching and building</h2>

<p>Building is performed with <code>xbuild</code>, which needs a couple of properties to help it
recognize which version of the framework we're using:</p>

<pre class="prettyprint"><code>$ hg clone https://code.google.com/p/noda-time/
$ cd noda-time/src
$ xbuild /p:TargetFrameworkVersion="v3.5" /p:TargetFrameworkProfile="" "NodaTime Mono.sln"
$ mono /path/to/nunit-console.exe NodaTime.Test/bin/Debug/NodaTime.Test.dll
</code></pre>

<p>To build the release configuration (which also builds the XML documentation file) use
<code>/p:Configuration=Release</code> in addition to the existing properties when running <code>xbuild</code>.</p>

  </body>
</html>
